﻿using System;
using System.ServiceProcess;
using ffmpeg;

namespace servicioConversor
{
	public partial class FfmpegConversor : ServiceBase
	{
		Conversor conversor = null;
		public FfmpegConversor()
		{
			InitializeComponent();
		}

		internal void Inicializar()
		{
			conversor = new Conversor(
				serviceConversor.Properties.Settings.Default.QueueFilename,
				serviceConversor.Properties.Settings.Default.FfmpegPath,
				serviceConversor.Properties.Settings.Default.FfmpegName,
				serviceConversor.Properties.Settings.Default.FfmpegArguments,
				serviceConversor.Properties.Settings.Default.TempFolder,
				serviceConversor.Properties.Settings.Default.ConvertedFolder,
				serviceConversor.Properties.Settings.Default.VideoExtension,
				serviceConversor.Properties.Settings.Default.SimultaneousConversions);
			conversor.Init();
		}

		protected override void OnStart(string[] args)
		{
			this.Inicializar();
		}

		protected override void OnStop()
		{
		}
	}
}
